package fr.ysa.persistence;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import fr.ysa.persistence.requetes.ConfigRequetes;

public interface IDao<T extends Entity> {

	public T sauvegarder(T obj) throws DaoException;

	public Collection<T> sauvegarder(Collection<T> entities) throws DaoException;

	public T modifier(T obj) throws DaoException;

	public void supprimer(T obj) throws DaoException;

	public void supprimerParId(final Serializable id) throws DaoException;

	public void supprimer(Collection<T> entities) throws DaoException;

	public Integer compter(ConfigRequetes config) throws DaoException;

	public List<T> trouver(ConfigRequetes config) throws DaoException;

	public T trouver(Serializable key) throws DaoException;
}
